#include "stdafx.h"
#include "TextBoxExample.h"

void TextBoxExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    //获取第二页
    FCTabPage *tabPage = getTabPage(L"TabPage2");
    FCTextBox *textBox3 = new FCTextBox();
    FCPoint point = {100,100};
    textBox3->setLocation(point);
    FCSize size = {100,20};
    textBox3->setSize(size);
    tabPage->addView(textBox3);

    FCButton *button1 = getButton(L"Button");
    button1->addEvent((FCTouchEventCallBack*)this, FCEventID_Click, this);
}

void TextBoxExample::callTouchEvent(String eventName, Object sender, FCTouchInfo touchInfo, Object invoke){
    FCTextBox *textBox = getTextBox(L"TextBox");
    FCTextBox *textBox2 = getTextBox(L"TextBox2");
    String text = textBox->getText();
    String text2 = textBox2->getText();
}
